--- ltmain-v2.2.6.in	2009-06-22 15:33:27.000000000 +0200
+++ ltmain-v2.2.6.in.new	2009-07-16 16:21:04.000000000 +0200
@@ -1742,7 +1742,7 @@
 	      func_source "$lib"
 	    fi
 	    libfile="$libdir/"`$ECHO "X$lib" | $Xsed -e 's%^.*/%%g'` ### testsuite: skip nested quoting test
-	    if test -n "$libdir" && test ! -f "$libfile"; then
+	    if test -n "$libdir" && test ! -f "${D}$libfile"; then
 	      func_warning "\`$lib' has not been installed in \`$libdir'"
 	      finalize=no
 	    fi
@@ -5351,6 +5351,12 @@
 		    add_dir="$add_dir -L$inst_prefix_dir$libdir"
 		    ;;
 		esac
+	      else
+		case $libdir in
+		  [\\/]*)
+		    add_dir="$add_dir -L\\\"\\\${D}\\\"$libdir"
+		    ;;
+		esac
 	      fi
 	      add="-l$name"
 	    fi
